package cn.liulin.llxianjie.controller;

import cn.liulin.llcommon.pojo.response.ResObj;
import cn.liulin.llxianjie.pojo.XianJieAddress;
import cn.liulin.llxianjie.service.XianJieAddressService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * cn.liulin.llxianjie.controller$
 *
 * @author ll
 * @date 2022-01-17 15:05:13
 **/
@RestController
@RequestMapping("/xianjie/address")
public class XianJieAddressController {

    @Resource
    private XianJieAddressService xianJieAddressService;

    @GetMapping(value = "/{id}/info")
    public ResObj getAddressInfo(@PathVariable String id) {
        XianJieAddress xianJieAddress = xianJieAddressService.selectByPrimaryKey(id);
        return ResObj.ok(xianJieAddress);
    }
}
